package com.qin.thymeleaf.controller;

import org.springframework.boot.autoconfigure.thymeleaf.ThymeleafProperties;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.Map;

/**
 * 传入一个参数给前台
 * @author Leisure
 * create 2022 2022/9/29 14:55
 **/
@Controller
public class HelloController {
    @RequestMapping("/hello")
    public String hello(Map<String, Object> map) {
        //通过 map 向前台页面传递数据
        map.put("name", "你好 Thymeleaf");
        return "hello";
    }
}
